<template>
  <div id="extension-box" :style="{ '--color': `${background_color}` }">
    <div v-show="template&&this.$store.state.isWXlogined != 0">
      <div v-if="template === '01'">
        <div class="background-box">
          <div class="extension-head">
            <img class="extension-head-avatar" :src="userInfo.avatar" alt="" />
            <div class="extension-name-box" :style="{ maxWidth: share_page ? '73%' : '83%' }">
              <p class="extension-name van-ellipsis">{{ userInfo.nickname }}</p>
              <p class="extension-id" v-if="show_member_id != 1">ID：{{ userInfo.member_id }}</p>
            </div>
            <div class="extension-share" @click="toPage('MyIncome')" v-if="share_page">
              <i class="iconfont icon-bc_share_card"></i>
            </div>
          </div>

          <block>
            <div class="extension-nickname-box" :style="{ height: !moreIdentity && income_page.identity.length > 5 ? '75px' : '' }" v-if="income_page.identity && income_page.identity.length > 0">
              <div class="extension-nickname-bg" v-if="uniacid!='128'"></div>
              <div :class="uniacid != '128' ? 'nickname-warp' : 'user-level'">
                <span :class="uniacid!='128' ? 'nickname-warp-item' : 'user-level-name'" v-for="(identity, index) in income_page.identity" :key="index">
                  <img v-if="uniacid == '128' && isHaveStar(identity)" class="level-icon" src="../../assets/images/new/star.png" alt="" />{{ identity }}
                </span>
              </div>
              <i class="iconfont icon-member-top moreIdentity" v-if="!moreIdentity && income_page.identity.length > 5" @click="showMoreIdentity"></i>
              <i class="iconfont icon-member-bottom moreIdentity" v-if="moreIdentity" @click="showMoreIdentity"></i>
              
            </div>
          </block>
          <!-- <block v-if="uniacid == '128'">
            <div class="extension-nickname-box" :style="{ height: !moreIdentity && income_page.identity.length > 5 ? '75px' : '' }" v-if="income_page.identity && income_page.identity.length > 0">
             
              <div class="nickname-warp">
                <div class="user-level">
                  <div class="user-level-name" v-for="(identity, index) in income_page.identity" :key="index" @click="gotoMemberGrade">
                    <img v-if="isHaveStar(identity)" class="level-icon" src="../../assets/images/new/star.png" alt="" />
                    <span>{{ identity }}</span>
                  </div>
                </div>
              </div>
              <i class="iconfont icon-member-top moreIdentity" v-if="!moreIdentity && income_page.identity.length > 5" @click="showMoreIdentity"></i>
              <i class="iconfont icon-member-bottom moreIdentity" v-if="moreIdentity" @click="showMoreIdentity"></i>
            </div>
          </block> -->
          <!-- 十佳合--分红收入 -->
           <div v-if="uniacid == '128'" class="extension-nickname-box" :style="{ height: !moreIdentity && income_page.identity.length > 5 ? '75px' : '' }">
            <div class="extension-nickname-bg"></div>
            <div class="nickname-warp">
              <span class="nickname-warp-item" style="border: none;">分红收入:{{ fenhongIncome }}</span>
            </div>
          </div>
          <!--  十佳合--分红收入 end-->
          <div class="erdutixian-box_01" v-if="is_show_limit">
            <span style="color: #c8c8c8;">当前提现额度</span>
            <span style="color: #edd0a3;font-size: 18px;font-weight: bold;">{{ amount_num }}</span>
          </div>
          <div :class="{ 'extension-money-box-bg': is_show_limit }">
            <div class="extension-money-box">
              <div class="extension-money-box-head">
                <div class="time-box">
                  <span
                    :class="[income.type === income_statistic_type ? 'active' : '']"
                    v-for="(income, index) in income_statistic_type_box"
                    :key="index"
                    @click="tabChange('income_statistic_type', income.type)"
                    >{{ income.title }}</span
                  >
                </div>
                <div class="asset-line"></div>
                <div class="asset-right-box 1" v-if="userInfo.autoWithdraw == 0 && withdraw_date && !withdraw_date.disable" @click="gotoIncome">
                  <i class="iconfont icon-fontclass-shouru"></i>
                  <span>{{ fun.initWithdrawal() }}</span>
                </div>
                <div class="asset-right-box 2" v-if="userInfo.autoWithdraw != 0 && withdraw_date && !withdraw_date.disable">
                  <i class="iconfont icon-fontclass-shouru"></i>
                  <span>{{ userInfo.autoWithdraw }}号自动{{ fun.initWithdrawal() }}</span>
                </div>
                <div class="asset-right-box 3" v-if="withdraw_date && withdraw_date.disable" @click="toToast">
                  <i class="iconfont icon-fontclass-shouru"></i>
                  <span>{{ withdraw_date.day }}号可{{ fun.initWithdrawal() }}</span>
                </div>
              </div>
              <div class="extension-money-box-body">
                <div class="body-head">
                  <div class="head-line"></div>
                  <div class="head-circle"></div>
                  <div class="head-line head-line-right"></div>
                </div>
                <div class="body-money">
                  <div class="body-money-item" v-for="(item, index) in income_statistic" :key="index" @click="toPage(item.url)">
                    <span class="money-top van-ellipsis"><countTo :startVal="0" :decimals="item.url === 'myRelationship' ? 0 : 2" :endVal="Number(item.value)" :duration="500"></countTo></span>
                    <span>{{ item.title }}</span>
                  </div>
                </div>
              </div>
              <p class="tips">本页收入统计仅包含已经结算部分，不含未结算部分~</p>
              <p class="tips">已提现收入，未提现收入，提现中收入，团队粉丝不随周期变化</p>
            </div>
          </div>
        </div>

        <div class="eChats-box">
          <div class="tab-head">
            <div class="tab-item" :class="[charts_type !== '1' ? 'active' : '']" @click="tabChange('charts_type', '')">收入动态</div>
            <div class="tab-item" :class="[charts_type === '1' ? 'active' : '']" @click="tabChange('charts_type', '1')">收入占比</div>
          </div>
          <div>
            <div id="echats-income" v-if="charts_type !== '1'" style="height: 220px; width: 21rem;"></div>
          </div>
          <div>
            <div id="echats-income-pie" v-if="charts_type === '1'" style="height: 250px; width: 21rem;"></div>
          </div>
        </div>

        <div class="income-box">
          <div class="income-item" v-for="(btn, i) in income_page.button" :key="btn.icon + i" @click="toPage(btn.url)">
            <i class="iconfont" :class="btn.icon"></i>
            <p>{{ btn.title }}</p>
          </div>
        </div>

        <div class="available-box">
          <div class="tab-head">
            <div class="tab-item" :class="[available_type !== '1' ? 'active' : '']" @click="tabChange('available_type', '')">我的权限</div>
            <div class="tab-item" v-if="is_show_unable == 1" :class="[available_type === '1' ? 'active' : '']" @click="tabChange('available_type', '1')">未开通权限</div>
          </div>
          <div class="available-body">
            <template v-if="available_type !== '1'">
              <div class="available-item" v-for="(item, i) in extension" @click="gotoPage(item)" :key="item.icon + i">
                <i class="iconfont" :class="item.icon" :style="item|setBGImage"></i>
                <div class="available-money">
                  <p style="word-break: keep-all;" class="van-ellipsis">{{ item.title }}</p>
                  <p class="red-money van-ellipsis">
                    <span>{{ $i18n.t("money") }}</span
                    >{{ item.value }}
                  </p>
                </div>
                <i class="fa fa-angle-right"></i>
              </div>
            </template>
            <template v-if="available_type === '1'">
              <div class="available-item" v-for="item in unextension" @click="gotoPage(item)" :key="item.url">
                <i class="iconfont" :class="item.icon" :style="item|setBGImage"></i>
                <div class="available-money">
                  <p style="word-break: keep-all;">{{ item.title }}</p>
                  <p class="red-money van-ellipsis">
                    <span>{{ $i18n.t("money") }}</span
                    >{{ item.value }}
                  </p>
                </div>
                <i class="fa fa-angle-right"></i>
              </div>
            </template>
          </div>
        </div>

        <div class="eChats-box">
          <div class="tab-head">
            <div class="tab-item" :class="[fans_type !== '1' ? 'active' : '']" @click="tabChange('fans_type', '')">粉丝裂变</div>
            <div class="tab-item" :class="[fans_type === '1' ? 'active' : '']" @click="tabChange('fans_type', '1')">粉丝转化</div>
          </div>
          <div>
            <div id="echats-fans" v-if="fans_type !== '1'" style="height: 220px; width: 21rem;"></div>
          </div>
          <div>
            <div id="echats-fans-line" v-if="fans_type === '1'" style="height: 220px; width: 21rem;"></div>
          </div>
          <div class="fans-box">
            <div class="fans-item" v-for="(fans, index) in fans_fission.data" :key="index">
              <p>{{ fans.value }}</p>
              <p>{{ fans.title }}</p>
            </div>
          </div>
        </div>

        <div class="plugin-items-box">
          <div class="plugin-items-icon" v-for="icon in income_page.plugin_data" :key="icon.url" @click="pluginGoto(icon)">
            <i class="iconfont" :class="icon.class"></i>
            <span>{{ icon.title }}</span>
          </div>
        </div>

        <div class="order-box">
          <div class="tab-head">
            <div class="tab-item" :class="[extension_type !== '1' ? 'active' : '']" @click="tabChange('extension_type', '')">推广订单</div>
            <div class="tab-item" :class="[extension_type === '1' ? 'active' : '']" @click="tabChange('extension_type', '1')">推广粉丝</div>
          </div>
          <div class="order-list" v-if="extension_type !== '1'">
            <div class="order-item" v-for="order in extension_order.data" :key="order.order_sn">
              <div class="order-top">
                <p class="order-sn">{{ order.order_sn }}</p>
                <p class="status">{{ order.status_name }}</p>
              </div>
              <div class="order-bottom">
                <p class="time">{{ order.create_time }}</p>
                <p class="money">
                  <span class="old-price">{{ $i18n.t("money") }}{{ order.goods_price }}</span
                  ><span>实付:{{ $i18n.t("money") }}{{ order.price }}</span>
                </p>
              </div>
            </div>
          </div>
          <div class="fans-list" v-if="extension_type === '1'">
            <div class="fans-item" v-for="order in extension_order.data" :key="order.order_sn">
              <img class="img" :src="order.avatar" alt="" />
              <div class="fans-item-right">
                <div class="fans-item-top">
                  <p class="fans-name">
                    <span>{{ order.nickname }}</span> <span class="id">{{ order.child_id }}</span>
                  </p>
                  <p class="pay-box">
                    支付订单数: <span class="num">{{ order.order_price }}</span>
                  </p>
                </div>
                <div class="fans-item-bottom">
                  <span class="time">{{ order.created_at }}</span>
                  <p class="pay-box">
                    支付订单总额: <span class="num">{{ $i18n.t("money") }}{{ order.order_count }}</span>
                  </p>
                </div>
              </div>
            </div>
          </div>
          <div v-if="extension_order.data && extension_order.data.length <= 0" style="margin-top: 10px;">暂无数据</div>
        </div>

        <U_backup :btnFlag="btnFlag" :id="1" :datas="btnData"></U_backup>

        <i v-if="service" class="iconfont icon-member_kefu service-box" :style="{ left: fun.getPhoneEnv() == 3 ? '61%' : buttonClientWidth }" @click="openService"></i>

        <d-connect-customer-service
          :show="showPopup"
          :tel="service.service_mobile"
          :online="service.cservice"
          :qrcode="service.service_QRcode"
          @closed="showPopup = false"
        ></d-connect-customer-service>

        <!--海报部分-->
        <yz-goodsposter v-model="posterShow" :posterData="poster_Data" :defaultImg="poster" :width="`18.875rem`" v-on:finish="uploadImageM"></yz-goodsposter>
        <!--海报部分end-->
      </div>

      <!-- 推广中心新页面 -->
      <div v-if="template === '02'">
        <div class="new_header">
            <div class="new_top">
              <div class="new_img">
                <img :src="userInfo.avatar" style="width: 100%; height: 100%;" />
              </div>
              <div class="">
                <div class="new_header_info">
                  <div class="name">{{userInfo.nickname}}</div>
                  <div class="shenfen" v-if="show_member_id!=1">[{{language.extension['会员']}}ID：{{userInfo.member_id}}]</div>
                </div>
                <!-- <div class="user-level" v-if="uniacid == '128'">
                  <div class="user-level-name" v-if="level_name" @click="gotoMemberGrade">
                    <img class="level-icon" src="../../assets/images/member/level-icon.png" alt="" />
                    <span>{{ level_name }}</span>
                  </div>
                </div> -->
              </div>
            </div>
            <div class="new_con">
              <div class="new_con_top">
                <div class="li"  v-if="uniacid != '45'">
                    <div class="li_tit">{{ $i18n.t("extension.累计") }}{{ income_name_text }}</div>
                    <div class="li_num">
                        <text class="small">{{$i18n.t("money")}}</text>{{userInfo.grand_total}}
                    </div>
                </div>
                <!-- 换牛--累计收入改为"贡献值" -->
                <div class="li" v-if="uniacid == '45'">
                    <div class="li_tit">贡献值</div>
                    <div class="li_num">
                        {{userInfo.grand_total}}
                    </div>
                </div>
                <!-- 换牛--累计收入改为"贡献值" end-->
               
                <div class="li"  v-if="uniacid != '45' && uniacid != '121'" >
                    <div class="li_tit">{{ $i18n.t("extension.可") }}{{ fun.initWithdrawal() }}{{ income_name_text }}</div>
                    <div class="li_num">
                        <text class="small">{{$i18n.t("money")}}</text>{{userInfo.usable_total}}
                    </div>
                </div>
                <div class="li"  v-if="uniacid == '121'">
                    <div class="li_tit">推广收入</div>
                    <div class="li_num">
                        <text class="small">{{$i18n.t("money")}}</text>{{userInfo.usable_total}}
                    </div>
                </div>
                <!-- 按钮 -->
                <div class="keti" @click="gotoIncome" v-if="userInfo.auto_withdraw == 0 && withdraw_date && !withdraw_date.disable && ygb_isCanTixian && isCanTixian && uniacid != '121'">{{ $i18n.t("extension.去") }}{{ fun.initWithdrawal() }}</div>
                <div class="keti" @click="gotoIncome" v-if="userInfo.auto_withdraw == 0 && withdraw_date && !withdraw_date.disable && ygb_isCanTixian && isCanTixian && uniacid == '121'">转入积分余额</div>
                <div class="keti" v-if="userInfo.auto_withdraw != 0 && withdraw_date && !withdraw_date.disable">{{ userInfo.auto_withdraw }}号自动{{ fun.initWithdrawal() }}</div>
                <div class="keti" @click="toToast" v-if="withdraw_date && withdraw_date.disable">{{ withdraw_date.day }}号可{{ fun.initWithdrawal() }}</div>
              </div>
              <div class="new_con_bot">
                <div class="bot_li" @click="toPage('myEarnings')" v-if="showEarning">
                    <div class="icon">
                        <img src="https://shops.cg500.com/static/hxt/yingye.png" class="images"/>
                    </div>
                    <div class="span">{{ $i18n.t("extension.领取收益") }}</div>
                </div>
                <div class="bot_li" v-if="uniacid != '89'" @click="toPage('incomedetails')">
                    <div  class="icon">
                        <img src="https://shops.cg500.com/static/hxt/wallet.png" class="images"/>
                    </div>
                    <div class="span">{{ income_name_text }}{{ $i18n.t("extension.明细") }}</div>
                </div>
                <div class="bot_li" v-if="uniacid != '89' && uniacid != '121'" @click="toPage('presentationRecord')">
                    <div  class="icon">
                        <img src="https://shops.cg500.com/static/hxt/clipboard-text.png" class="images"/>
                    </div>
                    <div class="span">{{ fun.initWithdrawal() }}{{ $i18n.t("extension.明细") }}</div>
                </div>
                <!-- 智店宝 121 -->
                <div class="bot_li" v-if="uniacid == '121'" @click="toPage('presentationRecord')">
                    <div  class="icon">
                        <img src="https://shops.cg500.com/static/hxt/clipboard-text.png" class="images"/>
                    </div>
                    <div class="span">转入{{ $i18n.t("extension.明细") }}</div>
                </div>
                <!-- 智店宝 121 结束-->
                <div class="bot_li" v-if="uniacid == '46'" @click="toPage('recommend')">
                    <div  class="icon">
                        <img src="https://shops.cg500.com/static/hxt/wallet.png" class="images"/>
                    </div>
                    <div class="span">推广人列表</div>
                </div>
                <div class="bot_li" @click="toPage('Performance')" v-if="is_show_performance">
                    <div  class="icon">
                        <img src="https://shops.cg500.com/static/hxt/shouyi.png" class="images"/>
                    </div>
                    <div class="span">{{ $i18n.t("extension.营业额") }}</div>
                </div>
                <div class="bot_li" v-if="high_light.url" @click="btnHighLight">
                    <div class="num">{{high_light.count}}</div>
                    <div class="span">{{ highLightName }}</div>
                </div>
                <div class="bot_li" @click="toPage('incometotaldetail')" v-if="uniacid1 == 5">
                    <div class="icon">
                        <img src="" class="images"/>
                    </div>
                    <div class="span">积分汇总</div>
                </div>
                <div class="bot_li" @click="toPage('withdrawtai')" v-if="uniacid1 == 38">
                    <div  class="icon">
                        <img src="" class="images"/>
                    </div>
                    <div class="span">提现</div>
                </div>
                <div class="bot_li" v-if="is_show_limit">
                    <div class="num">{{amount_num}}</div>
                    <div class="span">当前提现额度</div>
                </div>
                <div class="bot_li" v-if="uniacid == '58'">
                    <div class="num">{{agentK1}}</div>
                    <div class="span">代理商区域</div>
                </div>
                <div class="bot_li" v-if="uniacid == '58'">
                    <div class="num">{{agentK2}}</div>
                    <div class="span">一级市场区域</div>
                </div>
                <div class="bot_li" v-if="uniacid == '58'">
                    <div class="num">{{agentK3}}</div>
                    <div class="span">二级市场区域</div>
                </div>
              </div>

            </div>
        </div>
        <div class="new_content">
          <!-- 权限 -->
          <div class="new_list">
            <div class="new_tit">{{ $i18n.t("extension.权限") }}</div>
          </div>
          <div class="new_plugg">
            <div class="plug-list" v-for="(item, i) in extension" @click="gotoPage(item)" :key="i">
              <i class="iconfont" :class="item.icon" :style="item|setBGImage"></i>
              <ul class="left">
                <li class="left_a van-ellipsis">{{ item.title }}</li>
                <li class="left_b" v-if="item.level == null || item.level == '' || item.level == undefined ? false : true">
                  {{ item.level }}
                </li>
                <li class="left_b" v-if="item.level == null || item.level == '' || item.level == undefined ? true : false"></li>
                <li class="left_c">
                  <span>{{ $i18n.t("money") }}</span
                  >{{ item.value }}
                </li>
              </ul>
            </div>
            <div v-if="uniacid == '63'" class="plug-list" @click="gotoAI" :key="i">
              <i class="iconfont iconfont icon-team-bonus"></i>
              <ul class="left" style="display: flex;align-items: center;">
                <li class="left_a van-ellipsis">AI线索</li>
              </ul>
            </div>
            <div v-if="uniacid == '83'" class="plug-list" @click="gotoTeamOrder" :key="i">
              <i class="iconfont iconfont icon-team-bonus"></i>
              <ul class="left" style="display: flex;align-items: center;">
                <li class="left_a van-ellipsis">团队订单</li>
              </ul>
            </div>
            <!-- 牛牛商城-89-申请消费商 开始 -->
            <div v-if="uniacid == '89'" class="plug-list" @click="applyBuy">
              <!-- <i class="iconfont iconfont icon-team-bonus"></i> -->
               <div class="iconfont">
                <img style="width: 50px;height: 50px;" src="../../assets/images/new/apply-shang.png" alt="">
               </div>
              
              <ul class="left" style="display: flex;align-items: center;">
                <li class="left_a van-ellipsis">申请消费商</li>
              </ul>
            </div>
            <!-- 牛牛商城-89-申请消费商 结束 -->
            <!-- 惠新通 -->
            <div v-if="uniacid == '96'" class="plug-list" @click="hxtPage('sj')">
                <!-- <i class="iconfont iconfont icon-team-bonus"></i> -->
                <div class="iconfont">
                  <img style="width: 50px;height: 50px;" src="../../assets/images/hxt/tab.png" alt="">
                </div>
                
                <ul class="left" style="display: flex;align-items: center;">
                  <li class="left_a van-ellipsis">数据展示</li>
                </ul>
              </div>
            <div v-if="uniacid == '96'" class="plug-list" @click="hxtPage('gl')">
                <!-- <i class="iconfont iconfont icon-team-bonus"></i> -->
                <div class="iconfont">
                  <img style="width: 50px;height: 50px;" src="../../assets/images/hxt/tab2.png" alt="">
                </div>
                
                <ul class="left" style="display: flex;align-items: center;">
                  <li class="left_a van-ellipsis">管理页面</li>
                </ul>
              </div>
          </div>

          <!-- 更多权限 -->
          <div class="new_list" v-if="unextension.length > 0">
            <div class="new_tit">{{ $i18n.t("extension.更多权限") }}</div>
          </div>
          <div class="new_plugg" v-if="unextension.length > 0">
            <div class="plug-list" v-for="(item, i) in unextension" @click="gotoPage(item)" :key="i">
              <i class="iconfont" :class="item.icon" :style="item|setBGImage"></i>
              <ul class="left">
                <li class="left_a" v-if="uniacid == '60' && item.title == '经销商提成(fjyx)'">分红</li>
                <li class="left_a" v-else-if="uniacid == '54' && item.title == '经销商提成(fjyx)'">门店</li>
                <li class="left_a" v-else-if="uniacid == '58' && item.title == '经销商提成(fjyx)'">运营中心</li>
                <li class="left_a" v-else-if="uniacid == '67' && item.title == '经销商提成(fjyx)'">合伙人</li>
                <li class="left_a" v-else>{{ item.title }}</li>
                <li class="left_b"></li>
                <li class="left_c">
                  <span>{{ $i18n.t("money") }}</span
                  >{{ item.value }}
                </li>
              </ul>
            </div>
            <div class="plug-list" v-if="uniacid == '54'" @click="tapShichang">
              <div style="width: 70px; height: 70px; ">
                <img src="https://shops.cg500.com/static/shichangbutie.png" style="width: 100%; height: 100%;">
              </div>
              <ul class="left">
                <li class="left_a">市场补贴</li>
                <li class="left_b"></li>
                <li class="left_c"><span>{{ $i18n.t("money") }}</span>{{ butie}}</li>
              </ul>
            </div>
          </div>
        </div>
        
      </div>

      <!-- 优化推广中心 -->
      <div v-if="template === '03'">
        <div id="header">
          <div :class="uniacid1 ==6 ? 'top1' : 'top'">
            <div class="img">
              <img :src="userInfo.avatar" style="width: 100%; height: 100%;" />
            </div>
            <ul class="header-info">
              <li class="header-name">{{ userInfo.nickname }}</li>
              <li v-if="show_member_id != 1">
                <span>[{{ $i18n.t("extension.会员") }}ID：{{ userInfo.member_id }}]</span>
              </li>
            </ul>
            <div class="share" @click="toPage('MyIncome')" v-if="share_page">
              <i class="iconfont icon-extension_code"></i>
              <span>{{ income_name_text }}{{ $i18n.t("extension.分享") }}</span>
            </div>
            <div v-if="uniacid == '67'" class="share" @click="getErwm('MyIncome')">
              <i class="iconfont icon-extension_code"></i>
              <span>二维码</span>
            </div>
          </div>
          <div v-if="uniacid != '89'" class="" :class="uniacid != '45' ? 'income1' : 'income1'">
            <ul v-if="uniacid != '45'">
              <li class="header-top">{{ $i18n.t("extension.累计") }}{{ income_name_text }}</li>
              <li>
                <small>{{ $i18n.t("money") }}</small>
                {{ userInfo.grand_total }}
              </li>
            </ul>
            <!-- 换牛--累计收入改为"贡献值" -->
            <ul v-if="uniacid == '45'">
              <li class="header-top">贡献值</li>
              <li>
                {{ userInfo.grand_total }}
              </li>
            </ul>
            <!-- 换牛--累计收入改为"贡献值" end-->
            <ul class="right" v-if="uniacid != '45'">
              <li class="header-top">{{ $i18n.t("extension.可") }}{{ fun.initWithdrawal() }}{{ income_name_text }}</li>
              <li>
                <small>{{ $i18n.t("money") }}</small>
                {{ userInfo.usable_total }}
              </li>
            </ul>

            <div :class="uniacid1 == 6 ? 'btn1' : 'btn'" @click="gotoIncome" v-if="userInfo.auto_withdraw == 0 && withdraw_date && !withdraw_date.disable && ygb_isCanTixian && isCanTixian" style="position: relative;">
              <button type="button">{{ $i18n.t("extension.去") }}{{ fun.initWithdrawal() }}<i class="fa fa-angle-right"></i></button>
            </div>
            <div class="btn" v-if="userInfo.auto_withdraw != 0 && withdraw_date && !withdraw_date.disable">
              <button type="button" style="background-color: #ccc;">
                {{ userInfo.auto_withdraw }}号自动{{ fun.initWithdrawal() }}
                <i class="fa fa-angle-right"></i>
              </button>
            </div>
            <div class="btn" @click="toToast" v-if="withdraw_date && withdraw_date.disable" style="position: relative; width: 26%;">
              <button type="button" style="background-color: #ccc;">{{ withdraw_date.day }}号可{{ fun.initWithdrawal() }}<i class="fa fa-angle-right"></i></button>
            </div>
          </div>
        </div>

        <ul id="detail">
          <li @click="toPage('myEarnings')" v-if="showEarning">
            <i class="iconfont icon-extension_receive"></i>
            <span>{{ $i18n.t("extension.领取收益") }}</span>
            <i class="fa fa-angle-right"></i>
          </li>
          <li v-if="uniacid != '89'" @click="toPage('incomedetails')">
            <i class="iconfont icon-member_integral1-copy"></i>
            <span>{{ income_name_text }}{{ $i18n.t("extension.明细") }}</span>
            <i class="fa fa-angle-right"></i>
          </li>
          <li v-if="uniacid != '89'" @click="toPage('presentationRecord')">
            <i class="iconfont icon-member-withdrawals1"></i>
            <span>{{ fun.initWithdrawal() }}{{ $i18n.t("extension.明细") }}</span>
            <i class="fa fa-angle-right"></i>
          </li>
          <li v-if="uniacid == '46'" @click="toPage('recommend')">
            <i class="iconfont icon-member_integral1-copy"></i>
            <span>推广人列表</span>
            <i class="fa fa-angle-right"></i>
          </li>
          <li @click="toPage('Performance')" v-if="is_show_performance">
            <i class="iconfont icon-extension_collect"></i>
            <span>{{ $i18n.t("extension.营业额") }}</span>
            <i class="fa fa-angle-right"></i>
          </li>
          <li v-if="high_light.url" @click="btnHighLight">
            <i class="iconfont icon-fontclass-gaodeng"></i>
            <span>{{ highLightName }}</span>
            <span class="high_light_count">{{ high_light.count }}</span>
            <i class="fa fa-angle-right"></i>
          </li>
          <li @click="toPage('incometotaldetail')" v-if="uniacid1 == 5">
            <i class="iconfont icon-fontclass-gaodeng"></i>
            <span>积分汇总</span>
            <!-- <span class="high_light_count">{{ high_light.count }}</span> -->
            <i class="fa fa-angle-right"></i>
          </li>
          <li @click="toPage('withdrawtai')" v-if="uniacid1 == 38">
            <i class="iconfont icon-fontclass-gaodeng"></i>
            <span>提现</span>
            <!-- <span class="high_light_count">{{ high_light.count }}</span> -->
            <i class="fa fa-angle-right"></i>
          </li>
          <li v-if="is_show_limit">
            <i class="iconfont icon-cord_erdutixian"></i>
            <span>当前提现额度：{{ amount_num }}</span>
          </li>
        </ul>

        <!-- 代理商 -->
        <div id="power" v-if="uniacid == '58'">
          <div class="title">
            <div class="spare"></div>
            <h1>代理商</h1>
          </div>

          <!--  模板2 -->
          <div class="plugg" v-if="template === '02'">
            <div class="plug-list">
              <ul class="left text-center width100">
                <li class="left_a van-ellipsis text-center width100">代理商区域</li>
                <li class="left_b text-center width100">
                  {{agentK1}}
                </li>
              </ul>
            </div>
            <div class="plug-list">
              <ul class="left text-center width100">
                <li class="left_a van-ellipsis text-center width100">一级市场区域</li>
                <li class="left_b text-center width100">
                  {{agentK2}}
                </li>
              </ul>
            </div>
            <div class="plug-list">
              <ul class="left text-center width100">
                <li class="left_a van-ellipsis text-center width100">二级市场区域</li>
                <li class="left_b text-center width100">
                  {{agentK3}}
                </li>
              </ul>
            </div>
          </div>
          <!-- 模板2end -->
        </div>

        <!-- 权限插件模版 -->
        <div id="power">
          <div class="title">
            <div class="spare"></div>
            <h1>{{ $i18n.t("extension.权限") }}</h1>
          </div>
          <div v-if="uniacid == '63'" class="title" style="font-weight: 600; display:flex; justify-content: center; align-items: center; " @click="checkdetailYC">
            <div style="width: 12px; height: 12px; background-color: coral; border-radius: 50%;margin-right: 8px;"></div>
            月分润明细
          </div>

          <!--  模板2 -->
          <div class="plugg" v-if="template === '02'">
            <div class="plug-list" v-for="(item, i) in extension" @click="gotoPage(item)" :key="i">
              <i class="iconfont" :class="item.icon" :style="item|setBGImage"></i>
              <ul class="left">
                <li class="left_a van-ellipsis">{{ item.title }}</li>
                <li class="left_b" v-if="item.level == null || item.level == '' || item.level == undefined ? false : true">
                  {{ item.level }}
                </li>
                <li class="left_b" v-if="item.level == null || item.level == '' || item.level == undefined ? true : false"></li>
                <li class="left_c">
                  <span>{{ $i18n.t("money") }}</span
                  >{{ item.value }}
                </li>
              </ul>
            </div>
             <div v-if="uniacid == '63'" class="plug-list" @click="gotoAI" :key="i">
              <i class="iconfont iconfont icon-team-bonus"></i>
              <ul class="left" style="display: flex;align-items: center;">
                <li class="left_a van-ellipsis">AI线索</li>
              </ul>
            </div>
            <div v-if="uniacid == '83'" class="plug-list" @click="gotoTeamOrder" :key="i">
              <i class="iconfont iconfont icon-team-bonus"></i>
              <ul class="left" style="display: flex;align-items: center;">
                <li class="left_a van-ellipsis">团队订单</li>
              </ul>
            </div>
            <!-- 牛牛商城-89-申请消费商 开始 -->
            <div v-if="uniacid == '89'" class="plug-list" @click="applyBuy">
              <!-- <i class="iconfont iconfont icon-team-bonus"></i> -->
               <div class="iconfont">
                <img style="width: 50px;height: 50px;" src="../../assets/images/new/apply-shang.png" alt="">
               </div>
              
              <ul class="left" style="display: flex;align-items: center;">
                <li class="left_a van-ellipsis">申请消费商</li>
              </ul>
            </div>
            <!-- 牛牛商城-89-申请消费商 结束 -->
            <!-- 惠新通 -->
            <div v-if="uniacid == '96'" class="plug-list" @click="hxtPage('sj')">
                <!-- <i class="iconfont iconfont icon-team-bonus"></i> -->
                <div class="iconfont">
                  <img style="width: 50px;height: 50px;" src="../../assets/images/hxt/tab.png" alt="">
                </div>
                
                <ul class="left" style="display: flex;align-items: center;">
                  <li class="left_a van-ellipsis">数据展示</li>
                </ul>
              </div>
            <div v-if="uniacid == '96'" class="plug-list" @click="hxtPage('gl')">
                <!-- <i class="iconfont iconfont icon-team-bonus"></i> -->
                <div class="iconfont">
                  <img style="width: 50px;height: 50px;" src="../../assets/images/hxt/tab2.png" alt="">
                </div>
                
                <ul class="left" style="display: flex;align-items: center;">
                  <li class="left_a van-ellipsis">管理页面</li>
                </ul>
              </div>
            
            <!-- 惠新通 -->

          </div>
          <!-- 模板2end -->
        </div>

        <!-- 更多权限插件模版 -->
        <div id="more-power" v-if="is_show_unable == 1">
          <div class="title">
            <div class="spare"></div>
            <h1>{{ $i18n.t("extension.更多权限") }}</h1>
          </div>

          <!-- 模板2 -->
          <div class="plugg" v-if="template === '02'">
            <div class="plug-list" v-for="(item, i) in unextension" @click="gotoPage(item)" :key="i">
              <i class="iconfont" :class="item.icon" :style="item|setBGImage"></i>
              <ul class="left">
                <li class="left_a" v-if="uniacid == '60' && item.title == '经销商提成(fjyx)'">分红</li>
                <li class="left_a" v-else-if="uniacid == '54' && item.title == '经销商提成(fjyx)'">门店</li>
                <li class="left_a" v-else-if="uniacid == '58' && item.title == '经销商提成(fjyx)'">运营中心</li>
                <li class="left_a" v-else-if="uniacid == '67' && item.title == '经销商提成(fjyx)'">合伙人</li>
                <li class="left_a" v-else>{{ item.title }}</li>
                <li class="left_b"></li>
                <li class="left_c">
                  <span>{{ $i18n.t("money") }}</span
                  >{{ item.value }}
                </li>
              </ul>
            </div>
            <div class="plug-list" v-if="uniacid == '54'" @click="tapShichang">
              <div style="width: 70px; height: 70px; ">
                <img src="https://shops.cg500.com/static/shichangbutie.png" style="width: 100%; height: 100%;">
              </div>
              <ul class="left">
                <li class="left_a">市场补贴</li>
                <li class="left_b"></li>
                <li class="left_c"><span>{{ $i18n.t("money") }}</span>{{ butie}}</li>
              </ul>
            </div>
          </div>
          <!-- 模板2end -->
        </div>
      </div>

      <div v-if="fun.isIphoneX()" style="height: 34px;"></div>
      <div style="height: 6.25rem;"></div>
    </div>
    <!--海报部分-->
    <yz-goodsposter v-model="posterShow" :posterData="poster_Data" :defaultImg="poster" :width="`18.875rem`" v-on:finish="uploadImageM"></yz-goodsposter>
      <!--海报部分end-->
    <div v-if="this.$store.state.isWXlogined == 0" style="position:absolute;top: 40%;width: 100%;">
      <!-- 还没登录 -->
      <p>你还没登录,请登录后查看推广中心</p>
      <van-button type="danger" style="margin-top: 18px;" @click="toAuthorizedLogin">登录</van-button>
    </div>

     <!-- 牛牛商城-89-申请消费商一次确认弹窗 -->
     <van-popup v-model="applyBuyFirstShow" position="center" :overlay="true" round :close-on-click-overlay="false">
      <div class="dui-pop1" style="display: flex;flex-direction: column;">
        <div class="duihuanPop-title">申请消费商</div>
        <div style="width:100%;height: 59px;display: flex;align-items: center;padding: 0 26px;flex-direction: column;">
          
          <div style="display: flex;flex: 1;flex-direction: column;">
            <span>是否确认转为消费商？</span>
            <span style="color: red;font-size: 12px;font-weight: 500;margin-top: 8px;">转为消费商以后不再享受消费者对应权益！</span>
          </div>
        </div>
        <div class="" style="height: 50px;display: flex;width: 100%;border-top: 1px solid #eaeaea;">
          <div @click="cancelApplyFirst" style="width: 50%;text-align: center;line-height: 50px;border-right: 1px solid #eaeaea;">否</div>
          <div @click="confirmApplyFirst" style="width: 50%;text-align: center;line-height: 50px;color: #f0a367;">是</div>
        </div>
      </div>
    </van-popup>
     <!-- 牛牛商城-89-申请消费商二次确认弹窗 -->
     <van-popup v-model="applyBuySecondShow" position="center" :overlay="true" round :close-on-click-overlay="false">
      <div class="dui-pop1" style="display: flex;flex-direction: column;">
        <div class="duihuanPop-title">提示</div>
        <div style="width:100%;height: 59px;display: flex;align-items: center;padding: 0 26px;flex-direction: column;">
          
          <div style="display: flex;flex: 1;flex-direction: column;">
            <span>转为消费商后不可再转回是否确认？</span>
            <span style="color: red;font-size: 12px;font-weight: 500;margin-top: 8px;">转为消费商以后不再享受消费者对应权益！</span>
          </div>
        </div>
        <div class="" style="height: 50px;display: flex;width: 100%;border-top: 1px solid #eaeaea;">
          <div @click="cancelApplySecond" style="width: 50%;text-align: center;line-height: 50px;border-right: 1px solid #eaeaea;">取消</div>
          <div @click="confirmApplySecond" style="width: 50%;text-align: center;line-height: 50px;color: #f0a367;">确定</div>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
import index_controller from "./index_controller";
export default index_controller;
</script>
<style lang="scss" scoped>
  .icon-member-chaining {
    background: url("https://shops.cg500.com/static/miniNewImage/liandong.png") no-repeat center;
    background-size: 34px !important;
  }
  .user-level {
  display: flex;
  align-items: center;
  margin: 0 0.8rem;
  margin-top: 10px;
}

.user-name-box {
  justify-content: space-between;

  .user-name {
    width: 90%;
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    span {
      font-size: 14px;
      font-weight: 400;
    }
  }

  .icon-massage_set {
    width: 15%;
    font-size: 20px;
    color: #7f5c02;
  }
}
.user-level-name {
  display: flex;
  padding: 3px 7px;
  font-size: 12px;
  align-items: center;
  background-color: #a36705;
  border-radius: 15px;
  color: #fff;
  margin-right: 10px;

  .level-icon {
    width: 14px;
    height: 14px;
    margin-right: 3px;
  }

  .fa-angle-right {
    font-size: 16px;
    margin-left: 3px;
  }
}

.user-level-time {
  font-size: 12px;
  margin-left: 5px;
  color: #af820d;
}
</style>
<style>

 .width100 {
    width: 100% !important;
  }
  .text-center {
    text-align: center !important;
  }
   /* 换牛二期-88-兑换积分弹窗 */
.dui-pop {
  width: 280px;
  height: 200px;
  border-radius: 20px;
}
.duihuanPop-title {
  height: 60px;
  line-height: 60px;
  font-size: 17px;
  color: #333;
  font-weight: 600;
}
.duihuanPop-input {
  height: 74px;
  border: none;
  text-align: center;
  font-size: 26px;
  width: 100%;
  text-align: right;
}
.duihuanPop-input1 {
  height: 40px;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  text-align: center;
  width: 180px;
}
.duihuanPop-btn {
  width: 200px;
  height: 40px;
  border-radius: 20px;
  background: #f0a367;
  color: #fff;
  line-height: 40px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  margin: 0 auto;
}
/* 兑换一次确定弹窗 */
.dui-pop1 {
  width: 280px;
  height: 170px;
  border-radius: 20px;
}
/*  兑换二次确定弹窗 */
.dui-pop2 {
  width: 280px;
  height: 140px;
  border-radius: 20px;
}

/* 新样式z */
.new_header{
  background: linear-gradient(to bottom ,#DAE9FF,#f5f5f5);
}
.new_header .images{
    width: 100%;
    height: 100%;
}
.new_header .new_top{
    display: flex;
    align-items: center;
    padding: 0.625rem;
    box-sizing: border-box;
}
.new_header .new_top .new_img{
    width:3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
}.new_header_info{
    display: flex;
    align-items: center;
}

.new_header_info .name{
    margin: 0 0.8rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    font-size: 18px;
}
.new_con{
    background: url("https://shops.cg500.com/static/hxt/kabg.png") no-repeat;
    background-size: 100% 100%;
    /* height: 107px; */
    padding: 1rem 1rem 2rem;
    box-sizing: border-box;
    position: relative;
    width: 98%;
    margin: auto;

}
.new_con .new_con_top{
    display: flex;
    /* align-items: center; */
    align-items: flex-start;
    color: #fff;
    padding: 0.7rem;
    width: calc(100% - 3.5rem);
}
.new_con .new_con_top .li{
    flex: 1;
    width: 36%;
    word-break: break-all;
}
.new_con .new_con_top .li .li_tit{
    font-size: 12px
}
.new_con .new_con_top .li .li_num{
    font-size: 18px;
    font-weight: 700;
}
.new_con .new_con_top .keti{
    font-size: 12px;
    color: #1652B1;
    background: url("https://shops.cg500.com/static/hxt/tixian.png") no-repeat;
    background-size: 100% 100%;
    width: 5rem;
    height: 2.125rem;
    position: absolute;
    top: 1.25rem;
    right: 0;
    text-align: center;
    line-height: 1.625rem;
}
.new_con_bot{
    background: #fff;
    border-radius: 6px;
    padding: 0.625rem;
    display: flex;
    flex-wrap: wrap;
}
.new_con_bot .bot_li{
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;

}
.new_con_bot .bot_li .icon{
    
  width: 1.5rem;
  height: 1.5rem;
}

.new_con_bot .bot_li .span{
   font-size: 12px;
   color: #7E838E;
   margin-top: 3px;
}
.new_con_bot .bot_li .num{
    font-size: 16px;
    color: #071B3B;
    font-weight: 700;
   margin-top: 0.25rem;

 }
 .new_content{
    text-align: left;
     padding:0 1rem 1rem;
     box-sizing: border-box;
 }
 .new_content .new_tit{
    font-size: 1rem;
    font-weight: 700;
    color: #151515;
 }
 .new_content .new_plugg{
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1rem 0;
    display: flex;
    flex-wrap: wrap;
    margin: 1rem 0;
 }
 .new_content .new_plugg .plug-list{
     width: 50%;
     display: flex;
     align-items: center;
    margin-bottom: 0.75rem;

 }
 .new_content .new_plugg .plug-list .iconfont{
  color: #f15353;
  font-size: 3.5rem;
  background-size: 4rem;
  width: 4rem !important;
  height: 4rem !important;
  display: flex;
  align-items: center;
  justify-content: center;

}
.new_content .new_plugg .plug-list .left{
 flex: 1;
 margin-left: 0.3rem;
}

.new_content .new_plugg .plug-list .li{
    font-size: 14px;
    /* margin-left: 8rpx; */
}
.new_content .new_plugg .plug-list .left_a{
    color: #151515;
    font-weight: 700;
}
.new_content .new_plugg .plug-list .left_b{
    color: #A4A8B1;
    font-size: 12px;
}
.new_content .new_plugg .plug-list .left_c{
    color: #FF3638;
    font-weight: 700;

}

</style>
<style lang="scss" rel="stylesheet/scss" scoped>
 
</style>
